using System;
using System.Collections.Generic;
using System.Text;
namespace GSM.BusinessLayer
{
	public class Event: BusinessObjectBase
	{

		#region InnerClass
		public enum EventFields
		{
			EventID,
			Subject,
			Content,
			Description,
			BeginDate,
			FinishDate,
			EventStatus,
			PromotionID,
			PromotionID2,
			FormatSMS1,
			FormatSMS2,
			FormatSMS3,
			Deleted,
			EventMessageStatus
		}
		#endregion

		#region Data Members

			int _eventID;
			string _subject;
			string _content;
			string _description;
			DateTime? _beginDate;
			DateTime? _finishDate;
			bool? _eventStatus;
			int? _promotionID;
			int? _promotionID2;
			string _formatSMS1;
			string _formatSMS2;
			string _formatSMS3;
			bool _deleted;
			bool? _eventMessageStatus;

		#endregion

		#region Properties

		public int  EventID
		{
			 get { return _eventID; }
			 set
			 {
				 if (_eventID != value)
				 {
					_eventID = value;
					 PropertyHasChanged("EventID");
				 }
			 }
		}

		public string  Subject
		{
			 get { return _subject; }
			 set
			 {
				 if (_subject != value)
				 {
					_subject = value;
					 PropertyHasChanged("Subject");
				 }
			 }
		}

		public string  Content
		{
			 get { return _content; }
			 set
			 {
				 if (_content != value)
				 {
					_content = value;
					 PropertyHasChanged("Content");
				 }
			 }
		}

		public string  Description
		{
			 get { return _description; }
			 set
			 {
				 if (_description != value)
				 {
					_description = value;
					 PropertyHasChanged("Description");
				 }
			 }
		}

		public DateTime?  BeginDate
		{
			 get { return _beginDate; }
			 set
			 {
				 if (_beginDate != value)
				 {
					_beginDate = value;
					 PropertyHasChanged("BeginDate");
				 }
			 }
		}

		public DateTime?  FinishDate
		{
			 get { return _finishDate; }
			 set
			 {
				 if (_finishDate != value)
				 {
					_finishDate = value;
					 PropertyHasChanged("FinishDate");
				 }
			 }
		}

		public bool?  EventStatus
		{
			 get { return _eventStatus; }
			 set
			 {
				 if (_eventStatus != value)
				 {
					_eventStatus = value;
					 PropertyHasChanged("EventStatus");
				 }
			 }
		}

		public int?  PromotionID
		{
			 get { return _promotionID; }
			 set
			 {
				 if (_promotionID != value)
				 {
					_promotionID = value;
					 PropertyHasChanged("PromotionID");
				 }
			 }
		}

		public int?  PromotionID2
		{
			 get { return _promotionID2; }
			 set
			 {
				 if (_promotionID2 != value)
				 {
					_promotionID2 = value;
					 PropertyHasChanged("PromotionID2");
				 }
			 }
		}

		public string  FormatSMS1
		{
			 get { return _formatSMS1; }
			 set
			 {
				 if (_formatSMS1 != value)
				 {
					_formatSMS1 = value;
					 PropertyHasChanged("FormatSMS1");
				 }
			 }
		}

		public string  FormatSMS2
		{
			 get { return _formatSMS2; }
			 set
			 {
				 if (_formatSMS2 != value)
				 {
					_formatSMS2 = value;
					 PropertyHasChanged("FormatSMS2");
				 }
			 }
		}

		public string  FormatSMS3
		{
			 get { return _formatSMS3; }
			 set
			 {
				 if (_formatSMS3 != value)
				 {
					_formatSMS3 = value;
					 PropertyHasChanged("FormatSMS3");
				 }
			 }
		}

		public bool  Deleted
		{
			 get { return _deleted; }
			 set
			 {
				 if (_deleted != value)
				 {
					_deleted = value;
					 PropertyHasChanged("Deleted");
				 }
			 }
		}

		public bool?  EventMessageStatus
		{
			 get { return _eventMessageStatus; }
			 set
			 {
				 if (_eventMessageStatus != value)
				 {
					_eventMessageStatus = value;
					 PropertyHasChanged("EventMessageStatus");
				 }
			 }
		}


		#endregion

		#region Validation

		internal override void AddValidationRules()
		{
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("EventID", "EventID"));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Subject", "Subject",50));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Content", "Content",200));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Description", "Description",1000));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("FormatSMS1", "FormatSMS1",200));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("FormatSMS2", "FormatSMS2",200));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("FormatSMS3", "FormatSMS3",200));
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("Deleted", "Deleted"));
		}

		#endregion

	}
}
